from launch import LaunchDescription
from ament_index_python.packages import get_package_share_directory, get_package_prefix
from launch_ros.actions import ComposableNodeContainer
from launch_ros.descriptions import ComposableNode
import os
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch import LaunchDescription
from launch_ros.actions import Node
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
import launch

def generate_launch_description():
    config_file_root = '/home/ikun/nav2_ws/src/rm_bringup/config/unityAim.yaml'

    return launch.LaunchDescription([
        DeclareLaunchArgument(name='config_file_root',
                              default_value=config_file_root),
        Node(
            package='unity_bridge',
            executable='unity_autoaim_pub',
            name='unity_autoaim_pub',
            output='screen'
        ),
        
        Node(
            package='armor_detector',
            executable='armor_detector_node',
            output='screen',
            emulate_tty=True,
            parameters=[config_file_root],
        ),
       
    ])